<?php 
/**
 * Concept: blog content setup
 * Copyright 2011 www.gradientpixels.ca
 * Theme: Incantation Pro
 */

get_header(); ?>


<?php			
	$bloglayout = of_get_option('blog_layout');
		switch ($bloglayout) {
		case "left": // with left sidebar ?>
			
<div id="content-wrapper" class="clearfix" >
		<div class="w960">				
			<?php get_template_part( 'inc/sidebar-blog-left'); ?>	
				<div id="content-right" role="main">
					<?php if ( have_posts() ) : ?>
						<?php while ( have_posts() ) : the_post(); ?>
							<?php get_template_part( 'content', 'blog' ); ?>
					<?php endwhile; ?>
				
<?php if(function_exists('wp_pagenavi')) { // if PageNavi is activated ?>
	<?php wp_pagenavi(); // Use PageNavi ?>
<?php } else { // Otherwise, use traditional Navigation ?>
	<?php gp_content_nav( 'nav-below' ); ?> 
<?php } // End if-else statement ?>
	
					
					<?php else : // if no content is found ?>			
						<article id="post-0">
							<header class="entry-header"><h1 class="entry-title"><?php _e( 'Nothing Found', 'gp' ); ?></h1></header>
								<div class="entry-content">
									<p><?php _e( 'Unfortunately, there was no content found to show here. Perhaps searching will help find a related post.', 'gp' ); ?></p>
								<?php get_search_form(); ?>
								</div><!-- .entry-content -->
						</article><!-- #post-0 -->
					<?php endif; ?>
					
				</div><!-- #content-right -->				
		</div><!-- .w960 -->
</div><!-- #content-wrapper -->			
			
			<?php 
			break;
		case "full": // full width ?>

<div id="content-wrapper" class="clearfix" >
		<div class="w960">
			<div id="content-main" role="main">
				<?php if ( have_posts() ) : ?>
					<?php while ( have_posts() ) : the_post(); ?>
						<?php get_template_part( 'content', 'blog' ); ?>
				<?php endwhile; ?>
				<?php else : // if no content is found ?>			
					<article id="post-0">
						<header class="entry-header"><h1 class="entry-title"><?php _e( 'Nothing Found', 'gp' ); ?></h1></header><!-- .entry-header -->
							<div class="entry-content">
								<p><?php _e( 'Unfortunately, there was no content found to show here. Perhaps searching will help find a related post.', 'gp' ); ?></p>
							<?php get_search_form(); ?>
							</div><!-- .entry-content -->
					</article><!-- #post-0 -->
				<?php endif; ?>
				
<?php if(function_exists('wp_pagenavi')) { // if PageNavi is activated ?>
	<?php wp_pagenavi(); // Use PageNavi ?>
<?php } else { // Otherwise, use traditional Navigation ?>
	<?php gp_content_nav( 'nav-below' ); ?> 
<?php } // End if-else statement ?>

			</div><!-- #content-main -->	
			
		</div><!-- .w960 -->
</div><!-- #content-wrapper -->

			<?php 
			break;
		case "right": // with right sidebar ?>

<div id="content-wrapper" class="clearfix" >
	<div class="w960">
<?php get_template_part( 'inc/sidebar-blog-left'); ?>	
		<div id="content-right" role="main">
			<?php if ( have_posts() ) : ?>
				<?php while ( have_posts() ) : the_post(); ?>
					<?php get_template_part( 'content', 'blog' ); ?>
				<?php endwhile; ?>
				<?php else : // if no content is found ?>			
					<article id="post-0">
						<header class="entry-header"><h1 class="entry-title"><?php _e( 'Nothing Found', 'gp' ); ?></h1></header><!-- .entry-header -->
							<div class="entry-content">
								<p><?php _e( 'Unfortunately, there was no content found to show here. Perhaps searching will help find a related post.', 'gp' ); ?></p>
							<?php get_search_form(); ?>
							</div><!-- .entry-content -->
					</article><!-- #post-0 -->
				<?php endif; ?>

<?php if(function_exists('wp_pagenavi')) { // if PageNavi is activated ?>
	<?php wp_pagenavi(); // Use PageNavi ?>
<?php } else { // Otherwise, use traditional Navigation ?>
	<?php gp_content_nav( 'nav-below' ); ?> 
<?php } // End if-else statement ?>

			</div><!-- #content-left -->	
		
	</div><!-- .w960 -->		
</div><!-- #content-wrapper -->

			<?php
			break;
		}			

?>	


 
<?php get_footer(); ?>